<template>
  <page-list :x-uri="uri" :custom-components="custom" :doactions="doactions">
    <!-- 自定义tab -->
    <template v-slot:page-tabs>
      <tabs />
    </template>
  </page-list>
</template>
<script>
import PageList from '@public/template/page_list.vue';
import Tabs from '../components/tabs.vue';
export default {
  components: {
    PageList,
    Tabs
  },
  inject: ['reload'],
  data() {
    return {
      uri: 'course/admin/video/examine/list',
      tabs: [
        {
          title: '点播列表',
          uri: '/course/video/list',
          meta: {
            permission: 'course.video.default'
          }
        },
        {
          title: '课时审核',
          uri: '/course/video/examine/list',
          meta: {
            permission: 'course.video.examine.list'
          }
        }
      ],
      custom: {},
      doactions: [
        {
          title: '审核',
          meta: { permission: 'course.video.examine.handle' },
          callback: this.examine
        }
      ]
    };
  },
  methods: {
    examine: function({ row }) {
      this.$router.push({ path: '/course/video/examine/' + row.id + '/handle' });
    }
  }
};
</script>
